<template>
	<view class="container">
		<web-view :src="gameUrl"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				gameUrl: ''
			}
		},
		onLoad(option) {
			let item = JSON.parse(decodeURIComponent(option.data));
			let data = {
				apiUrl: item.apiUrl,
				sockUrl: item.sockUrl,
				token: item.token
			}
			let itemStr = encodeURIComponent(JSON.stringify(data));
			this.gameUrl = item.pagodaUrl + '?data=' + itemStr
		}
	}
</script>

<style scoped>
	.container {
		width: 100%;
		height: 100vh;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
</style>